<admintpl file="header" />

</head>
<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#A" data-toggle="tab">{:L('GENERAL_SETTING')}</a></li>
        </ul>
        <form class="form-horizontal js-ajax-form" action="{:U('AdminSettings/edit_post')}" method="post">
            <input type="hidden" name="post[id]" value="{$data.id}">
            <div class="tabbable">
                <div class="tab-content">
                    <div class="tab-pane active" id="A">
                        <fieldset>
                            <div class="control-group">
                                <label class="control-label">{:L('CATEGORY_TYPE')}</label>
                                <div class="controls">
                                    <select name="post[inter_type]">
                                        <foreach name="taxonomys" item="vo"> <php>$selected=$data['inter_type']==$key?"selected":""</php>
                                            <option value="{$key}"{$selected}>{$vo}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">{:L('INTERFACE_TITLE')}</label>
                                <div class="controls">
                                    <input type="text" name="post[inter_name]" value="{$data.inter_name}"><span class="form-required">*</span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">{:L('INTERFACE_DESCRIPTION')}</label>
                                <div class="controls">
                                    <textarea name="post[inter_description]" rows="5" cols="57">{$data.inter_description}</textarea>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">{:L('INTERFACE_URL')}</label>
                                <div class="controls">
                                    <input type="text" name="post[inter_url]" value="{$data.inter_url}" style="width: 400px"><span class="form-required">*</span>
                                </div>
                            </div>

                        </fieldset>
                    </div>

                </div>
            </div>
            <div class="form-actions">
                <button class="btn btn-primary js-ajax-submit" type="submit">{:L('SAVE')}</button>
                <a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
            </div>
        </form>
    </div>
    <script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript">
        $(function(){
            $('#A').find('select[name=taxonomy]').change(function(){
                var cate = $(this).children('option:selected').val();
                if(cate == "merch"){
                    $('#A .istop').css('display','block');
                    $('#A .logo').css('display','block');
                }else{
                    $('#A .istop').css('display','none');
                    $('#A .logo').css('display','none');
                }

            });
        });
    </script>
</body>
</html>